package com.grape.action;

import org.apache.struts2.convention.annotation.Action;
import org.apache.struts2.convention.annotation.Namespace;
import org.apache.struts2.convention.annotation.ParentPackage;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.annotation.Scope;
import org.springframework.stereotype.Controller;

import com.grape.pojo.Bookmark_Box;
import com.grape.service.Bookmark_Box_Service;

@Controller
@Namespace("/")
@Scope("prototype")
@ParentPackage("json-default")
public class Bookmark_Box_Action extends BaseAction<Bookmark_Box>{
	private static final long serialVersionUID = 1L;
	
	@Autowired
	private Bookmark_Box_Service bbs;
	
	// 添加书签
	@Action(value = "add_bb")
	public void addBookmark() {
		
		bbs.addBookmark(model,bname,burl);
	}
	
	// 修改书签
	@Action(value = "edit_bbname")
	public void editBbname() {
		System.out.println(model);
		bbs.editBbname(model);
	}
	
	
	// 删除书签目录
	@Action(value = "del_bb")
	public void delBb() {
		bbs.delBb(model.getId());
	}
}
